Skip to content

feat: eslint 10 support#677

Merged
amilajack merged 5 commits intoamilajack:mainfrom
astrochemx:fix/eslint-10-support
Feb 18, 2026
Merged

feat: eslint 10 support#677
amilajack merged 5 commits intoamilajack:mainfrom
astrochemx:fix/eslint-10-support

Conversation

@astrochemx
Copy link
Copy Markdown
Contributor

@astrochemx astrochemx commented Jan 24, 2026

Description

This PR updates the plugin to support ESLint v10 and ensures compatibility across ESLint v8, v9, and v10.

Fixes #675.

Key Changes

  • package.json:
    • Updated peerDependencies to allow eslint@^10.0.0.
    • Bumped typescript-eslint version to the latest to support ESLint v10.
    • Bumped eslint-plugin-eslint-plugin to the latest minor in the version range to fix TS error in eslint.config.mjs.
  • src/rules/compat.ts:
    • Refactored context property access to support both the deprecated in ESLint v9 (and completely removed in ESLint v10) methods (context.getSourceCode() and context.getFilename()), and the new ESLint v9+ properties (context.sourceCode and context.filename).
    • Implemented a double-cast (as unknown as Rule.RuleModule) for the create function return type to resolve TypeScript conflicts between strict internal node types and ESLint's generic RuleModule interface.
  • test/e2e.spec.ts:
    • Removed the type property from RuleTester error assertions, as this property was marked as deprecated in ESLint v9 and completely removed in ESLint v10.
  • .github/workflows/test.yml:
    • Added 10 (ESLint v10) to the ESLint test matrix.
    • Added --legacy-peer-deps to the npm i -D eslint@${{ matrix.eslint-version }} to allow ESLint v10 to be installed as an unsupported peer dependency for other packages.
    • Inverted the Run tests step logic to run npm test for ESLint v8 only and npm run spec ... for ESLint v9+.
    • Changed the Run e2e tests step logic to run only on ESLint v8.

Breaking Changes

None. This PR maintains backward compatibility with supported ESLint versions.

Suggestions

We should probably also address the issue that came up during the linting:
Browserslist: browsers data (caniuse-lite) is 6 months old.

@astrochemx astrochemx force-pushed the fix/eslint-10-support branch from 3d5a167 to e9af294 Compare January 29, 2026 16:10
@dargmuesli
Copy link
Copy Markdown
Contributor

@amilajack ESLint v10 has now been released, may I request your review on this? 🙏

Copy link
Copy Markdown
Contributor

@dargmuesli dargmuesli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think these changes can be made now

Co-authored-by: Jonas Thelemann <e-mail+github@jonas-thelemann.de>
@amilajack
Copy link
Copy Markdown
Owner

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. You're on a roll.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@dargmuesli
Copy link
Copy Markdown
Contributor

@amilajack codex seems to be happy, do you think we can release this?

@amilajack amilajack merged commit 6aaec34 into amilajack:main Feb 18, 2026
8 checks passed
github-actions bot pushed a commit that referenced this pull request Feb 18, 2026
# [6.2.0](v6.1.0...v6.2.0) (2026-02-18)

### Features

* eslint 10 support ([#677](#677)) ([6aaec34](6aaec34))
@github-actions
Copy link
Copy Markdown

🎉 This PR is included in version 6.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@dargmuesli
Copy link
Copy Markdown
Contributor

Thank you! ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Compatibility with ESLint 10.x

3 participants